import {Ref} from "vue";
import {backstageTradeEntity} from "@/api/flow";

export default function useGetTradeList() {
    const backstageTradeList: Ref = ref([])

    const getBackstageTradeList = async () => {
        const rs = await backstageTradeEntity({showCount: -1, currentPage: 1})
        if (rs.code === 200) {
            backstageTradeList.value = rs.payload
        }
    }

    return {
        backstageTradeList,
        getBackstageTradeList
    }
}
